<!DOCTYPE HTML>
<html>
<head>
    <title>Test Worker</title>
    <script type="text/javascript">
        var worker = new Worker("worker.js");
        worker.addEventListener('message',function(e){
            console.log(e.data+" evnet~");
        },false);
        worker.postMessage("Hello World!");
//        worker.onmessage = function(e){
//            console.log(e.data);
//        }

        //alert(worker.onmessage);
    </script>
</head>
<body>
</body>
</html>